# -*- coding = utf-8 -*-
# @Time : 2022/2/16 16:27
# @File : topic1.py
# @Software : PyCharm

import time


class Kt:
    __brand = ''
    __price = 0

    def setBrand(self, brand):
        if brand == 0:
            print("温馨提示：品牌不能为空！")
        else:
            self.__brand = brand

    def getBrand(self):
        return self.__brand

    def setPrice(self, price):
        if price < 0 or price > 10000:
            print("温馨提示：价格数据非法！")
        else:
            self.__price = price

    def getPrice(self):
        return self.__price

    def kaiji(self):
        print("空调开机了...")

    def gunaji(self):
        a = range(4)
        for i in reversed(a):
            print("空调将在%s分钟后自动关闭...\n" % i, end='')
            time.sleep(1)
        print("空调已关机！")

    def showMe(self):
        print(self.__brand, "空调", "售价为", self.__price, "元")


kongtiao = Kt()
kongtiao.setBrand('格力')
kongtiao.setPrice(4000)
kongtiao.kaiji()
kongtiao.gunaji()
kongtiao.showMe()
